package cate.game.pvp.pointrace.handler;

import cate.game.pvp.pointrace.data.PointRaceOpponent;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

@FunctionalInterface
public interface PointRaceOpQuery {

    @NoArgsConstructor
    @ToString
    @Data
    class QueryParam {
        private String uid;
        private long points;
        private int limit;

        public static QueryParam of(String uid, long points, int limit) {
            QueryParam param = new QueryParam();
            param.setUid(uid);
            param.setPoints(points);
            param.setLimit(limit);
            return param;
        }

    }

    List<PointRaceOpponent> query(QueryParam param);
}
